﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.ServiceModel;
using System.Runtime.Serialization;

using System.ComponentModel;


namespace MSAP.ObjectsStore
{
    public enum eRecordState
    {
        Created,
        Unchanged,
        Updated,
        Deleted
    };

    public enum eRecordStore
    { 
        Memory,
        Persistent
    };

    public interface IRecord 
    {
        [DataMember]
        Guid Oid {get;set;}
        [DataMember]
        eRecordState RecordState { get; set; }
        [DataMember]
        eRecordStore RecordStore { get; set; }

        bool IsDirty();

        void Save();
        void Load();
        void Delete();
        
        void Lock();
        void UnLock();
        bool IsLock();
    }
}
